
package com.soft.sitegenerator.form;


import java.util.Collection;
import java.util.Date;

import org.apache.struts.action.ActionForm;

import com.soft.sitegenerator.Component;
import com.soft.sitegenerator.DataBaseComponent;
import com.soft.sitegenerator.business.hibernate.NewsGroup;
import com.soft.sitegenerator.business.hibernate.Post;
import com.soft.sitegenerator.business.hibernate.User;

public class PostEditForm extends ActionForm {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
    private Component component=new DataBaseComponent();
    private Post post = (Post) component.getBean("postsHib");
	
    private Collection groups;
    Long idGroup = null;
    Long idUser;
    
    
	public Post getPost() {
		return post;
	}

	public void setPost(Post post) {
		this.post = post;
	}

	public boolean equals(Object arg0) {
		return post.equals(arg0);
	}

	public Date getCreationDate() {
		return post.getCreationDate();
	}

	public void setCreationDate(Date creationDate) {
		this.post.setCreationDate(creationDate);
	}

	public Long getId() {
		return post.getId();
	}

	public void setId(Long id) {
		this.post.setId(id);
	}

	public NewsGroup getNewsGroup() {
		return post.getNewsGroup();
	}

	public void setNewsGroup(NewsGroup newsGroup) {
		post.setNewsGroup(newsGroup);
	}

	public String getText() {
		return post.getText();
	}

	public void setText(String text) {
		this.post.setText(text);
	}

	public String getTitle() {
		return post.getTitle();
	}

	public void setTitle(String title) {
		this.post.setTitle(title);
	}

	public User getUser() {
		return post.getUser();
	}

	public void setUser(User user) {
		this.post.setUser(user);
	}


	public Collection getGroups() {
		return groups;
	}

	public void setGroups(Collection groups) {
		this.groups = groups;
	}

	public Long getIdGroup() {
		return idGroup;
	}

	public void setIdGroup(Long idGroup) {
		this.idGroup = idGroup;
	}

	public Long getIdUser() {
		return idUser;
	}

	public void setIdUser(Long idUser) {
		this.idUser = idUser;
	}

}